package com.example.springboot1.Controller;

import com.example.springboot1.model.Userinfo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2023-09-10
 * Time: 15:30
 */
@RestController
@RequestMapping("/user")
public class UserController {
    // 请求映射，用于处理请求
    @RequestMapping("/zcx")
    public Userinfo getUserInfo() {
        // 创建Userinfo对象
        Userinfo userinfo = new Userinfo();
        // 设置age属性
        userinfo.setAge("45");
        // 设置name属性
        userinfo.setName("zcx-yyds");
        // 返回Userinfo对象
        return userinfo;
    }

}
